# coding=utf-8

import zmq
import time

ctx = zmq.Context.instance()
socket = ctx.socket(zmq.REP)
socket.bind('tcp://*:5555')

while True:
    msg = socket.recv()
    print "received hello"

    # time.sleep(1)

    socket.send('world')

socket.close()
ctx.destroy()
